package com.topisv.tms.entity;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * 网点仓库表
 */
@Entity
@Table(name = "pms_areagroup")
public class AreaGroup extends IdEntity implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * 服务网点名称
	 */
	private String groupName;

	/**
	 * 服务网点编码
	 */
	private String groupCode;

	/**
	 * 服务网点介绍
	 */
	private String groupIntro;
	
	//流水线数量
	private int pipelineNum;
	//批次数量
	private int batchNum;
	//库区数量
	private int storageNum;
	
	private String warehouseType; //customer(商户),paiu(派友)
	
	private Customers customer;
	
	private String areas;
	
	private String isSubWarehouse;//是否是子仓 Y:是 N:否
	
	
	private Long waitProcessOrderNum =0l;//待处理订单数量
	private Long unProcessOrderNum =0l;//不可处理订单数量
	private Long unProcessXmlNum=0l;//未处理报文数量
	
	@Transient
	public Long getUnProcessXmlNum() {
		return unProcessXmlNum;
	}

	public void setUnProcessXmlNum(Long unProcessXmlNum) {
		this.unProcessXmlNum = unProcessXmlNum;
	}

	@Transient
	public Long getWaitProcessOrderNum() {
		return waitProcessOrderNum;
	}

	public void setWaitProcessOrderNum(Long waitProcessOrderNum) {
		this.waitProcessOrderNum = waitProcessOrderNum;
	}
	
	@Transient
	public Long getUnProcessOrderNum() {
		return unProcessOrderNum;
	}

	public void setUnProcessOrderNum(Long unProcessOrderNum) {
		this.unProcessOrderNum = unProcessOrderNum;
	}

	public String getWarehouseType() {
		return warehouseType;
	}

	public void setWarehouseType(String warehouseType) {
		this.warehouseType = warehouseType;
	}


	@ManyToOne
	@JoinColumn(name="customer_code",referencedColumnName="customer_code")
	public Customers getCustomer() {
		return customer;
	}

	public void setCustomer(Customers customer) {
		this.customer = customer;
	}


	private String[] provinces;
	
	private List<Area> proObj;
	
	public String getAreas() {
		return areas;
	}

	public void setAreas(String areas) {
		this.areas = areas;
	}	

	public AreaGroup() {
	}
	
	@Transient
	@JsonIgnore
	public String[] getProvinces() {
		return provinces;
	}

	public void setProvinces(String[] provinces) {
		this.provinces = provinces;
	}

	@Transient
	@JsonIgnore
	public List<Area> getProObj() {
		return proObj;
	}

	public void setProObj(List<Area> proObj) {
		this.proObj = proObj;
	}

	public AreaGroup(Long id) {
		this.id = id;
	}

	@Column(name="group_name")
	public String getGroupName() {
		return groupName;
	}

	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}

	@Column(name="group_code")
	public String getGroupCode() {
		return groupCode;
	}

	public void setGroupCode(String groupCode) {
		this.groupCode = groupCode;
	}

	@Column(name="group_intro")
	public String getGroupIntro() {
		return groupIntro;
	}

	public void setGroupIntro(String groupIntro) {
		this.groupIntro = groupIntro;
	}
	
	@Transient
	@JsonIgnore
	public int getPipelineNum() {
		return pipelineNum;
	}

	public void setPipelineNum(int pipelineNum) {
		this.pipelineNum = pipelineNum;
	}

	@Transient
	@JsonIgnore
	public int getBatchNum() {
		return batchNum;
	}

	public void setBatchNum(int batchNum) {
		this.batchNum = batchNum;
	}

	@Transient
	@JsonIgnore
	public int getStorageNum() {
		return storageNum;
	}

	public void setStorageNum(int storageNum) {
		this.storageNum = storageNum;
	}
	@Transient
	public String getIsSubWarehouse() {
		return isSubWarehouse;
	}

	public void setIsSubWarehouse(String isSubWarehouse) {
		this.isSubWarehouse = isSubWarehouse;
	}
	
}